﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
using BLL;
using Model;

namespace 超市收银台
{
    public partial class UI_LogIn : CCSkinMain
    {
        public UI_LogIn()
        {
            InitializeComponent();
        }

        private void Login_Click(object sender, EventArgs e)
        {
            string name = UserName.Text;
            string pwd = UserPass.Text;
            AdminService admin = new AdminService();//登录

            AdminInfo ad = admin.Login(name, pwd);
            if (admin == null)
            {
                MessageBox.Show("登录失败,用户名或者密码错误");
            }
            else
            {
                Zhumianban z = new Zhumianban();
                z.Show();
                this.Hide();
            }
        }

    }
}
